package com.runssnail.demo.spring.biz.manager.impl;

import com.runssnail.demo.spring.biz.dao.MemberDAO;
import com.runssnail.demo.spring.biz.domain.MemberDO;
import com.runssnail.demo.spring.biz.manager.MemberManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by zhengwei on 2016/2/22.
 */
@Service
public class MemberManagerImpl implements MemberManager {

    @Autowired
    private MemberDAO memberDAO;

    @Override
    public MemberDO getById(Long id) {
        return memberDAO.getById(id);
    }

    @Override
    public Long insert(MemberDO member) {
        return memberDAO.insert(member);
    }

    @Override
    public boolean update(MemberDO member) {
        return memberDAO.update(member);
    }

    @Override
    public boolean deleteById(Long id) {
        return memberDAO.deleteById(id);
    }

    @Override
    public List<MemberDO> selectAll() {
        return memberDAO.selectAll();
    }
}
